import { FormSchema } from '/@/components/Form';

// 部门基础表单
export function useBasicFormSchema() {
  const basicFormSchema: FormSchema[] = [
    {
      field: 'name',
      label: '地块名称',
      component: 'Input',
      componentProps: {
        placeholder: '请输入地块名称',
      },
      rules: [{ required: true, message: '请输入地块名称' }],
    },
    {
      field: 'parentId',
      label: '上级地块',
      component: 'TreeSelect',
      componentProps: {
        treeData: [],
        placeholder: '无',
        dropdownStyle: { maxHeight: '200px', overflow: 'auto' },
      },
    },
    {
      field: 'sort',
      label: '排序',
      component: 'InputNumber',
      componentProps: {},
    },
    {
      field: 'address',
      label: '地址',
      component: 'Input',
      componentProps: {
        placeholder: '请输入地址',
      },
    },
    {
      field: 'description',
      label: '描述',
      component: 'InputTextArea',
      componentProps: {
        placeholder: '请输入描述',
      },
    },
    // {
    //   field: 'latitude',
    //   label: '纬度',
    //   component: 'Input',
    //   componentProps: {
    //     placeholder: '请输入纬度',
    //   },
    // },
    // {
    //   field: 'longitude',
    //   label: '经度',
    //   component: 'Input',
    //   componentProps: {
    //     placeholder: '请输入经度',
    //   },
    // },
  ];
  return { basicFormSchema };
}
